<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <h1>学生信息列表</h1>
  <table border="1" width="600">
    <thead>
      <tr>
        <th>序号</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>性别</th>
        <th>入学时间</th>
        <th>所属院校</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody align="center">
      {{if list.length != 0}}
        {{each list value}}
        <tr>
          <td>{{value.sno}}</td>
          <td>{{value.sname}}</td>
          <td>{{value.sage}}</td>
          <td>{{value.sgender}}</td>
          <td>{{value.stime}}</td>
          <td>{{value.dname}}</td>
          <td>
            <a href="/delstu?no={{value.sno}}" onclick="return confirm('您是否要删除')">删除</a>
            <a href="/edit?no={{value.sno}}">编辑</a>
          </td>
        </tr>
        {{/each}}
      {{else}}
        <tr>
          <td colspan="6">没有相关数据</td>
        </tr>
      {{/if}}
    </tbody>
  </table>
  <button><a href="/add">点击添加新学生</a></button>
</body>
</html>